package com.tmsb.mall;

import com.ctrip.framework.apollo.Config;
import com.ctrip.framework.apollo.ConfigService;
import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer;
import com.tmsb.utils.Const;
import com.tmsb.utils.MyMath;
import com.tmsb.utils.RedisCluster;
import com.tmsb.utils.Util;

import java.math.BigDecimal;
import java.sql.SQLOutput;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.TimeUnit;

import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisCluster;


/**
 *Description:
 *Version:1.0.0
 *@author shihb
 *@date 2020/6/10 16:16
 */
public class Test {
  final double tmp = -12.0D;
  public static void main(String[] args) throws InterruptedException {
//    Set<String> idSets = new HashSet<>();
//    Set<String> idSets2 = new HashSet<>();
//    System.out.println(idSets);
//    idSets.add("111:222");
//    idSets.add("333:444");
//    idSets.forEach(o -> idSets2.add(o.substring(0,o.indexOf(":"))));
//    System.out.println(idSets2.size());
//
//    Long time=1592409599999L;
//    SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
//    System.out.println(sdf.format(new Date(time)));
//    Jedis jedis = new Jedis("172.16.9.17", 8001);
//    jedis.auth("tmsb@bigdata2020");
//    System.out.println(jedis.get("a"));

//    JedisCluster jedisCluster = RedisCluster.getInstance("172.16.9.17:8001").getRedisClusterList()
//        .get(0);
//    System.out.println(jedisCluster.get("a"));
//    double v = Double.parseDouble("-"+"2");
//    System.out.println(v+2);

//    Config appConfig = Const.appConfig;
//    while (true ){
//      TimeUnit.SECONDS.sleep(5);
//      System.out.println(appConfig.getProperty("name",""));
//      Integer intProperty = appConfig.getIntProperty("checkpoint.interval", 6000);
//      System.out.println(intProperty);
//    }
//    System.out.println(Util.getZeroPointTimestamps());
    List<BigDecimal> list = new ArrayList<>();
    Double doule=null;

    System.out.println();


//    list.add(new BigDecimal(12.3));
//    list.add(new BigDecimal(11.3));
//    list.add(new BigDecimal(10.3));
    Iterator<BigDecimal> iterator = list.iterator();
//    list.forEach(o1-> System.out.println(o1));
    iterator.forEachRemaining(o1-> System.out.println(o1));

//    System.out.println(Collections.max(list).doubleValue());
//    System.out.println(Collections.min(list).doubleValue());


  }
}
